The present invention relates to techniques for implementing a circuit that receives data frames, and more particularly, techniques for reconfiguring programmable portions of a logic circuit that detects data frames boundaries and aligns to an internal data bus appropriately given the detected word boundary in the frames.
At the beginning of each SONET or SDH frame is a framing pattern that consists of a repetition of ‘hF6 followed by a repetition of ‘h28. The length of the repetition is determined by the transmission rate(optical carrier level, or OC level), typically 1, 3, 12, 48, 192, or 768. The frame size, measured in time, is 125 μs. The amount of data transmitted in this time is equal to 810 bytes times the OC level. In a receiver, the frame boundary can be used to determine how to align in the incoming data stream to an internal data path. The amount of data processed every clock cycle corresponds to the internal data path width. This amount of data can be referred to as a word, and is typically 8, 16, 32, 64, 128, or 256 bits.
In SPI4.2, there is no frame, but some skew between each of the 16 data+1 control channels is allowed in the system. Without phase alignment, each channel would arrive at a receiver at slightly different times, mainly due to small differences in the length of the routing on a circuit board of each channel. The receiver handles the skew by delaying each channel independently as necessary to align transitions on all channels. The protocol changes between a training state where channel alignment is obtained, and an operating state where control and data is processed. Aligning all channels to a single clock is necessary prior to digital processing of the concatenation of channels.
From time to time, a SPI-4 transmitter will send a training pattern. This pattern is made up of some repetitions of a twenty word pattern. The twenty words are separated into ten consecutive words of data equal to 16‘h0FFF and control equal to 1'b1, followed by ten consecutive words of data equal to 16'hF000 and control equal to 1'b0. The transition from the first ten words to the second ten words is the boundary used to perform alignment.
A receiver does not necessarily know what skew exists between channels when it receives SPI4.2 data and control or where words begin and end when it receives a serial stream of SONET/SDH data. Therefore, it would be desirable to provide techniques for aligning channels inside a receiver to the word boundaries of an input stream. It would also be desirable to minimize the amount of the circuitry used to perform the word boundary detection functions.